home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_usrdoc / SUDO / PORTING.{_5 < prev    next >
Text File  |  1999-09-17  |  3KB  |  52 lines

  1. sudo porting hints:
  2.  
  3. Before trying to port sudo to a new architecture, please join the
  4. sudo-workers mailing list (see the README) and ask if anyone has
  5. a port working or in-progress.
  6.  
  7. Sudo should be fairly easy to port.  In fact, now that it uses a configure
  8. script, most of the work should be done for you.
  9.  
  10. If your OS is an SVR4 derivative (or some approximation thereof), it may
  11. be sufficient to tell configure you are runnng SVR4, something like:
  12.     configure foo-bar-sysv4
  13. where foo is the hardware architecture and bar is the vendor.
  14.  
  15. A possible pitfall is getdtablesize(2) which is used to get the maximum
  16. number of open files the process can have.  If an OS has the POSIX sysconf(2)
  17. it will be used instead of getdtablesize(2).  ulimit(2) or getrlimit(2) can
  18. also be used on some OS's.  If all else fails you can use the value of
  19. NOFILE in <sys/param.h>.
  20.  
  21. Sudo tries to clear the environment of dangerous envariables like LD_*
  22. to prevent shared library spoofing.  If you are porting sudo to a new
  23. OS that has shared libraries you'll want to mask out the variables that
  24. allow one to change the shared library path.  See badenv_table() in
  25. sudo.c to see how this is done for various OS's.
  26.  
  27. It is possible that on a really weird system, tgetpass() may not compile.
  28. (The most common cause for this is that the "fd_set" type is not
  29. defined in a place that sudo expects it to be.  If you can fine the
  30. header file where "fd_set" is typedef'd, have tgetpass.c include
  31. it and send in a bug report.)
  32. Alternately, it may compile but not work (nothing happens at Password: prompt).
  33. It is possible that your C library contains a broken or unusable crypt()
  34. function--try linking with -lcrypt if that exists.  Another possibility
  35. is that select() is not fully functional; setting PASSWORD_TIMEOUT to
  36. 0 in options.h will disable the use of select().  If all else fails
  37. you can run configure with the --with-getpass flag to use the system getpass().
  38. You'll lose the timeout feature but gain a working sudo.
  39. NOTE: S/Key and OPIE support will not work with most OS's getpass(3) routine.
  40.  
  41. If you are trying to port to a system without standard Berkeley
  42. networking you may find that interfaces.c will not compile.  This
  43. is most likely on OS's with STREAMS-based networking.  It should be
  44. possible to make it work by modifying the ISC streams support
  45. (see the _ISC #ifdef's).  However, if you don't care about ip address
  46. and network address support, you can just define STUB_LOAD_INTERFACES
  47. to get a do-nothing load_interfaces() stub function.
  48.  
  49. If you port sudo to a new architecture, please send the output of
  50. "configure" and your changes to:
  51.     sudo-bugs@courtesan.com
  52.